package com.dodayum;

import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.dodayum.service.IProtocol;

/**
 * @author BaiYu
 * @date 2023/7/3114:21
 */
public class Main {
    public static void main(String[] args) {
        ExtensionLoader<IProtocol> extensionLoader = ExtensionLoader.getExtensionLoader(IProtocol.class);
        IProtocol iProtocol;

        IProtocol aTrue = extensionLoader.getExtension("true");
        aTrue.sendRequest("123");

//        iProtocol = extensionLoader.getAdaptiveExtension();
//        iProtocol.sendRequest("demo");
        iProtocol = extensionLoader.getExtension("http");
        iProtocol.sendRequest("demo");
        iProtocol = extensionLoader.getExtension("tcp");
        iProtocol.sendRequest("demo");

    }
}